<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.*, java.text.*" %>
<%@ page import="com.google.appengine.api.users.*" %>
<%@ page import="com.google.appengine.api.datastore.*" %>     
<%
	UserService userService = UserServiceFactory.getUserService();
	User user = userService.getCurrentUser();
	
	// 로그인 세션이 없으면 구글 로그인 페이지로 이동
	if(user==null) {
		response.sendRedirect(userService.createLoginURL(request.getRequestURL().toString()));
	}
	
	//TODO: 접근 권한 구현 예정


	//프로젝트 ID
	int projectId = request.getParameter("projectId")==null?0:Integer.parseInt(request.getParameter("projectId"));	
	
	//이슈 ID
	int issueId = request.getParameter("issueId")==null?0:Integer.parseInt(request.getParameter("issueId"));		

	//TODO: Null 값 체크하는 유틸 구현 예정
    
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>TeamCloud - 그룹 등록</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="chrome=1">
	<!-- <link href="http://www.gstatic.com/codesite/ph/17444577587916266307/css/ph_core.css" rel="stylesheet" type="text/css" /> -->
	<link href="http://code.google.com/css/codesite.pack.04102009.css" rel="stylesheet" type="text/css" />
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/jquery-ui.min.js"></script>
</head>
<body>
   	<h2>그룹 등록</h2>
   	<form name="groupForm" action="groupInsert.jsp" method="post">
	  	<table width="500" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td width="70"><label for="groupNm">그룹명</label></td>
				<td><input type="text" name="groupNm" id="groupNm" maxlength="60" value="" style="width:100%;"/>
			</tr>
			<tr>
				<td><label for="groupDc">그룹 설명</label></td>
				<td>
					<textarea name="groupDc" id="groupDc" style="width:100%;height:100px"></textarea>
				</td>
			</tr>
			<tr>
				<td>공개</td>
				<td>
					<input type="radio" value="Y" name="othbcAt" id="othbcAtY" checked="checked"><label for="othbcAtY">공개</label> 
					<input type="radio" value="N" name="othbcAt" id="othbcAtN"><label for="othbcAtN">비공개</label> 
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="submit" class="save" value="저장" /> 
					<input type="button" class="cancel" title="Cancel" value="취소" onclick="location.href='issueList.jsp?projectId=<%=projectId%>'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>